<template>
	<view class="content">
		<view class="suss">
			<image class="suss_icon" src="@/static/picture/pay_s.png"></image>
			<view class="suss_text">支付成功！</view>
			<view class="suss_tip">已经马不停蹄通知技师接单请您耐心等待。</view>
			<view class="info_btn" @click="goInfo">查看详情</view>
		</view>
		<view class="fx-row-sta wx_code" v-if="isShow">
			<image class="code_icon" src="@/static/picture/wechat_code.png" ></image>
			<view class="code_tip">为避免您不能及时收到订单通知 请长按二维码识别关注</view>
		</view>
	</view>
</template>

<script>
	import { wxConcerned } from '@/utils/api.js'
	import badgeMix from '@/common/mixins.js' 
	import config from '@/config.js' 
	export default {
		mixins: [badgeMix], 
		data() {
			return { 
				orderId:'',
				isShow:false
			};
		},
		onShow() { 
			
		},
		
		onLoad(option) {
			this.orderId = option.id
			// #ifdef H5 
			// 判断是否关注公众号
			wxConcerned().then(res => {  
				if(res.result==0){  //值为0时，未关注 
					 this.isShow = true
				} else{
					this.isShow = false
				}
			}).catch(err => {}); 
			// #endif  
		},
		methods: {   
			goInfo(){
				uni.redirectTo({
					url:'/pages/order/orderDetails?state=info&id=' + this.orderId
				})
			}
		}
	}
</script>

<style lang="scss">
	page{
		background-color: #F8F8F8;
	}
	.content{
		width: 700rpx;
		margin: 0 auto;
		padding-top: 150rpx;
		.suss{
			text-align: center;
			.suss_icon{
				width: 318rpx;
				height: 256rpx;
				margin-bottom: 46rpx;
			}
			.suss_text{
				margin-bottom: 20rpx;
				font-size: 36rpx; 
				color: $uni-main-suss;
			}
			.suss_tip{
				width: 340rpx;
				margin: 0 auto;
				font-size: 24rpx;
				color: #8F8F8F;
			}
			.info_btn{
				width: 380rpx;
				height: 90rpx;
				margin: 0 auto;
				margin-top: 52rpx;
				background-color: $uni-main;
				font-size: 32rpx;
				color: #fff;
				text-align: center;
				line-height: 90rpx;
				border-radius: 46rpx;
			}
		}
		.wx_code{
			width: 636rpx;
			height: 222rpx;
			margin-top: 180rpx;
			padding: 32rpx 32rpx;
			background-color: #fff;
			.code_icon{
				width: 222rpx;
				height: 222rpx;
			}
			.code_tip{
				width: 392rpx;
				margin-left: 22rpx;
				text-align: center;
				font-size: 26rpx;
				color: #020202;
			}
		}
	}
	 
</style>
